import {
    http4
} from "@/service/axios";

// 计费规则列表
export function getBillingRules(data) {
    return http4.get({
        url: "/road/br/list?ruleName=" + data,
        data,
    });
}

// 新增计费规则
export function getAddBillingRules(data) {
    return http4.post({
        url: "/road/br/add",
        data,
    });
}

// 获取单条计费规则
export function getSingleBillingRule(data) {
    return http4.get({
        url: `/road/br/by/id/${data}`,
        data,
    });
}

// 编辑计费规则
export function getEditBillingRules(data) {
    return http4.post({
        url: "/road/br/edit",
        data,
    });
}

// 删除计费规则
export function getDeleteBillingRules(data) {
    return http4.delete({
        url: `/road/br/remove/${data}`,
        data,
    });
}

// 根据班组获取路段列表（已绑和可绑）接口
export function getSectionList(data) {
    return http4.get({
      url: `/road/br/section/list/${data}`,
      data,
    });
  }
  
  // 班组绑定路段或成员接口
  export function getBind({ ruleId, data }) {
    return http4.post({
      url: `/road/br/bind/section/${ruleId}`,
      data,
    });
  }
  